﻿using System;
using System.Web;
using System.Collections.Generic;
using System.Web.Script.Serialization;

namespace QD.Push.V3
{
    public class Notification_IOS
    {
        public Notification_IOS()
        {
            aps = new mAps();
            this.title = "";
        }
        public Notification_IOS(string title, string description)
        {
            this.aps = new mAps();
            this.aps.alert = description;
            this.title = title;
        }
        public mAps aps { get; set; }
        public string title { get; set; } //通知标题，可以为空；如果为空则设为appid对应的应用名;
        public int code { get; set; }     //客户端根据code判断执行响应的业务,code值在具体的项目里指定
        public object data { get; set; }  //客户端获取的数据,实体类对象

        public string getJsonString()
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            return serializer.Serialize(this);
        }
    }
}